package com.hzlx.data.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 设备实时运行状态与关键指标对象 mes_equipment_realtime_data
 * 
 * @author ruoyi
 * @date 2025-06-30
 */
public class EquipmentRealtimeData extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 数据ID */
    private Long dataId;

    /** 设备ID */
    @Excel(name = "设备ID")
    private Integer equipmentId;

    /** 数据采集时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "数据采集时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date timestamp;

    /** 当前运行状态 */
    @Excel(name = "当前运行状态")
    private String runStatus;

    /** 实时电流 */
    @Excel(name = "实时电流")
    private BigDecimal currentAmperage;

    /** 主轴温度 */
    @Excel(name = "主轴温度")
    private BigDecimal spindleTemperature;

    /** 振动幅度 */
    @Excel(name = "振动幅度")
    private BigDecimal vibrationAmplitude;

    /** 润滑油位百分比 */
    @Excel(name = "润滑油位百分比")
    private BigDecimal lubricantLevel;

    /** 当前报警代码 */
    @Excel(name = "当前报警代码")
    private String errorCode;

    /** 当前报警信息 */
    @Excel(name = "当前报警信息")
    private String errorMessage;

    /** 当前周期计数 */
    @Excel(name = "当前周期计数")
    private Long currentProductCount;

    /** OEE-可用性（%） */
    @Excel(name = "OEE-可用性", readConverterExp = "%=")
    private BigDecimal oeeAvailability;

    /** OEE-性能（%） */
    @Excel(name = "OEE-性能", readConverterExp = "%=")
    private BigDecimal oeePerformance;

    /** OEE-质量（%） */
    @Excel(name = "OEE-质量", readConverterExp = "%=")
    private BigDecimal oeeQuality;

    /** 总OEE（%） */
    @Excel(name = "总OEE", readConverterExp = "%=")
    private BigDecimal oeeTotal;

    public void setDataId(Long dataId) 
    {
        this.dataId = dataId;
    }

    public Long getDataId() 
    {
        return dataId;
    }

    public Integer getEquipmentId() {
        return equipmentId;
    }

    public void setEquipmentId(Integer equipmentId) {
        this.equipmentId = equipmentId;
    }

    public void setTimestamp(Date timestamp)
    {
        this.timestamp = timestamp;
    }

    public Date getTimestamp() 
    {
        return timestamp;
    }

    public void setRunStatus(String runStatus) 
    {
        this.runStatus = runStatus;
    }

    public String getRunStatus() 
    {
        return runStatus;
    }

    public void setCurrentAmperage(BigDecimal currentAmperage) 
    {
        this.currentAmperage = currentAmperage;
    }

    public BigDecimal getCurrentAmperage() 
    {
        return currentAmperage;
    }

    public void setSpindleTemperature(BigDecimal spindleTemperature) 
    {
        this.spindleTemperature = spindleTemperature;
    }

    public BigDecimal getSpindleTemperature() 
    {
        return spindleTemperature;
    }

    public void setVibrationAmplitude(BigDecimal vibrationAmplitude) 
    {
        this.vibrationAmplitude = vibrationAmplitude;
    }

    public BigDecimal getVibrationAmplitude() 
    {
        return vibrationAmplitude;
    }

    public void setLubricantLevel(BigDecimal lubricantLevel) 
    {
        this.lubricantLevel = lubricantLevel;
    }

    public BigDecimal getLubricantLevel() 
    {
        return lubricantLevel;
    }

    public void setErrorCode(String errorCode) 
    {
        this.errorCode = errorCode;
    }

    public String getErrorCode() 
    {
        return errorCode;
    }

    public void setErrorMessage(String errorMessage) 
    {
        this.errorMessage = errorMessage;
    }

    public String getErrorMessage() 
    {
        return errorMessage;
    }

    public void setCurrentProductCount(Long currentProductCount) 
    {
        this.currentProductCount = currentProductCount;
    }

    public Long getCurrentProductCount() 
    {
        return currentProductCount;
    }

    public void setOeeAvailability(BigDecimal oeeAvailability) 
    {
        this.oeeAvailability = oeeAvailability;
    }

    public BigDecimal getOeeAvailability() 
    {
        return oeeAvailability;
    }

    public void setOeePerformance(BigDecimal oeePerformance) 
    {
        this.oeePerformance = oeePerformance;
    }

    public BigDecimal getOeePerformance() 
    {
        return oeePerformance;
    }

    public void setOeeQuality(BigDecimal oeeQuality) 
    {
        this.oeeQuality = oeeQuality;
    }

    public BigDecimal getOeeQuality() 
    {
        return oeeQuality;
    }

    public void setOeeTotal(BigDecimal oeeTotal) 
    {
        this.oeeTotal = oeeTotal;
    }

    public BigDecimal getOeeTotal() 
    {
        return oeeTotal;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("dataId", getDataId())
            .append("equipmentId", getEquipmentId())
            .append("timestamp", getTimestamp())
            .append("runStatus", getRunStatus())
            .append("currentAmperage", getCurrentAmperage())
            .append("spindleTemperature", getSpindleTemperature())
            .append("vibrationAmplitude", getVibrationAmplitude())
            .append("lubricantLevel", getLubricantLevel())
            .append("errorCode", getErrorCode())
            .append("errorMessage", getErrorMessage())
            .append("currentProductCount", getCurrentProductCount())
            .append("oeeAvailability", getOeeAvailability())
            .append("oeePerformance", getOeePerformance())
            .append("oeeQuality", getOeeQuality())
            .append("oeeTotal", getOeeTotal())
            .toString();
    }
}
